<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
	prefix="logic"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
	<head>
		<title>page of team-manage</title>
		<LINK href="css/default.css" rel=stylesheet>
		<style type="text/css">
#id1 {
	width: 100%;
	height: 100%;
	background-color: #000;
	FILTER: alpha(opacity =     
		                                                         
		       50);
	position: absolute;
	top: 0;
	left: 0;
	moz-opacity: 0.8;
	opacity: .80;
	z-index: 49;
}

#id2 {
	top: 10px;
	position: absolute;
	z-index: 99;
	border: 3px solid #E5E5E5;
	left: 100px;
	font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
	background-color: #F5FAFA;
}
</style>
		<script language="javascript" type="text/javascript">
		function show(){
		document.all.id1.style.height=document.body.scrollHeight+"px";
		document.all.id1.style.width=document.body.scrollWidth+"px";
		document.all.id1.style.display="";
		document.all.id2.style.display="";
		}
		function hide(){
		document.all.id1.style.display="none";
		document.all.id2.style.display="none";
		}
		function opchange(o){
		document.sysTeamForm.method.value=o;
		document.sysTeamForm.submit();
		}
		</script>
		<script language="javascript" type="text/javascript"
			src="js/dragelement.js" /></script>
	</head>
	<body>
		<logic:present name="systeamlist">
			
			<table width="880" cellspacing="0" cellpadding="0" border="0">
				<tbody>
					<tr>
						<td width="3" height="31">
							<img height="31" src="./images/table_01.gif" width="3" />
						</td>
						<td background="./images/table_02.gif" height="31">
							<table cellspacing="0" cellpadding="0" width="146" align="left"
								border="0">
								<tbody>
									<tr>
										<td width="51" background="./images/title_1_bg.gif">
											<img height="31" src="./images/title_1.gif" width="51" />
										</td>
										<td width="95" background="./images/title_1_bg.gif">
											<span class="color_b_666">班组管理</span>
										</td>
									</tr>
								</tbody>
							</table>
						</td>
						<td width="3">
							<img height="31" src="./images/table_03.gif" width="3" />
						</td>
					</tr>
					<tr>
						<td width="3" background="./images/table_04.gif" width="3"
							align="right">
							<img height="100%" src="./images/table_04.gif" width="3" />
						</td>
						<td>
							<table width="770" border="0" align="center" cellpadding="0"
								cellspacing="1" bgcolor="#FF9900">
								<tr height="25">
									<th>
										<bean:message key="systeam.jsp.latnid" />
									</th>
									<th>
										<bean:message key="systeam.jsp.teamname" />
									</th>
									<th>
										<bean:message key="systeam.jsp.leaderName" />
									</th>
									<th>
										<bean:message key="common.jsp.operation" />
										<a href="sysTeam.do?method=list"> <u> <bean:message
													key="common.jsp.addlink" /></u> </a>
									</th>
								</tr>
								<logic:iterate name="systeamlist" id="i" offset="startRowNo"
									length="pageSize">
									<tr bgcolor="ffffff"  height="25">
										<td class="spec">
											<bean:write name="i" property="latnId" />
										</td>
										<td class="alt">
											<bean:write name="i" property="teamName" />
										</td>
										<td>
											<bean:write name="i" property="leaderName" />
										</td>
										<td class="alt">
											<html:link href="sysTeam.do?method=list&teamid=${i.teamId}">
												查看
											</html:link>
										</td>
									</tr>
								</logic:iterate>
								<tr  height="25">
									<td colspan="4" align="center">
										<a href="sysTeam.do?method=list&paging=first">首页</a>
										<a href="sysTeam.do?method=list&paging=previous">上一页</a>
										<a href="sysTeam.do?method=list&paging=next">下一页</a>
										<a href="sysTeam.do?method=list&paging=last">尾页</a>
										&nbsp;&nbsp;&nbsp;&nbsp; 第
										<bean:write name="currPage" />
										/
										<bean:write name="maxPage" />
										页
									</td>
								</tr>
							</table>
						</td>
						<td background="./images/table_05.gif" width="3" align="left">
							<img height="100%" src="./images/table_05.gif" width="3">
						</td>
					</tr>
					<tr>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_06.gif" width="3px">
						</td>
						<td height=3 valign="top">
							<img height="3px" src="./images/table_07.gif" width="100%">
						</td>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_08.gif" width="3px">
						</td>
					</tr>
				</tbody>
			</table>
		</logic:present>
		<logic:present name="systeam" scope="request">
			
				<html:form action="/sysTeam">
					<table width="400" border="0" align="center" cellpadding="5" cellspacing="1"
						bgcolor="#FF9900">
						<tr>
							<td>
								<bean:message key="systeam.jsp.teamid" />
							</td>
							<td>
								<html:text readonly="true" property="systeam.teamId"
									value="${systeam.teamId}" />
							</td>
						</tr>
						<tr>
							<td>
								<bean:message key="systeam.jsp.latnid" />
							</td>
							<td>
								<html:select property="systeam.latnId">
									<logic:iterate name="sysloclatnlist" id="j">
										<logic:equal name="systeam" property="latnId"
											value="${j.latnid}">
											<html:option value="${j.latnid}">
												<bean:write name="j" property="latnname" />
											</html:option>
										</logic:equal>
									</logic:iterate>
									<logic:iterate name="sysloclatnlist" id="j">
										<logic:notEqual name="systeam" property="latnId"
											value="${j.latnid}">
											<html:option value="${j.latnid}">
												<bean:write name="j" property="latnname" />
											</html:option>
										</logic:notEqual>
									</logic:iterate>
								</html:select>
							</td>
						</tr>
						<tr>
							<td>
								<bean:message key="systeam.jsp.teamname" />
							</td>
							<td>
								<html:text property="systeam.teamName"
									value="${systeam.teamName}" />
							</td>
						</tr>
						<tr>
							<td>
								<bean:message key="systeam.jsp.creatorName" />
							</td>
							<td>
								<html:text readonly="true" property="systeam.creatorName"
									value="${systeam.creatorName}" />
							</td>
						</tr>
						<tr>
							<td>
								<bean:message key="systeam.jsp.leaderName" />
							</td>
							<td>
								<html:select property="systeam.leaderName">
									<logic:iterate name="sysuserlist" id="j">
										<logic:equal name="systeam" property="leaderName"
											value="${j.userId}">
											<html:option value="${j.userName}">
												<bean:write name="j" property="userName" />
											</html:option>
										</logic:equal>
									</logic:iterate>

									<logic:iterate name="sysuserlist" id="j">
										<logic:notEqual name="systeam" property="leaderName"
											value="${j.userId}">
											<html:option value="${j.userName}">
												<bean:write name="j" property="userName" />
											</html:option>
										</logic:notEqual>
									</logic:iterate>
								</html:select>
							</td>
						</tr>

						<tr>
							<td colspan="2" align="center" valign="middle">
								<img src='images/button_modify.gif' width="63" height="21" onclick="opchange('save')" />
								&nbsp;&nbsp;
								<img src='images/button_delete.gif' width="63" height="21" onclick="opchange('delete')" />
								&nbsp;&nbsp;
								<img src='images/button_exit.gif' width="63" height="21" onclick="opchange('list')" />
							</td>
						</tr>
					</table>
					<html:hidden property="method" value="save" />
				</html:form>
		
		</logic:present>
		<logic:notPresent name="systeam" scope="request">
			
				<html:form action="/sysTeam">
					<table width="400" border="0" align="center" cellpadding="5" cellspacing="1"
						bgcolor="#FF9900">
						<tr>
							<th colspan="2">
								<bean:message key="systeam.jsp.addnew" />
							</th>

						</tr>
						<tr>
							<td>
								<bean:message key="systeam.jsp.latnid" />
							</td>
							<td>
								<html:select property="systeam.latnId">
									<logic:iterate name="sysloclatnlist" id="j">
										<html:option value="${j.latnid}">
											<bean:write name="j" property="latnname" />
										</html:option>
									</logic:iterate>
								</html:select>
							</td>
						</tr>
						<tr>
							<td>
								<bean:message key="systeam.jsp.teamname" />
							</td>
							<td>
								<html:text property="systeam.teamName" />
							</td>
						</tr>
						<tr>
							<td>
								<bean:message key="systeam.jsp.leaderName" />
							</td>
							<td>
								<html:select property="systeam.leaderName">
									<logic:iterate name="sysuserlist" id="j">
										<html:option value="${j.userName}">
											<bean:write name="j" property="userName" />
										</html:option>
									</logic:iterate>
								</html:select>
							</td>
						</tr>
						<tr>
							<td>
								<bean:message key="systeam.jsp.creatorName" />
							</td>
							<td>
								<html:text readonly="true" property="systeam.creatorName"
									value="${User_Name}" />
							</td>
						</tr>
						<tr>
							<td align="center" valign="middle" colspan="2">
								<img src='images/button_addnew.gif' width="63" height="21" onclick="opchange('save')" />
								&nbsp;&nbsp;
								<img src='images/button_cancel.gif' width="63" height="21" onclick="" />
							</td>
						</tr>
					</table>
					<html:hidden property="method" value="save" />
				</html:form>
			
		</logic:notPresent>
	</body>
</html>